﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using log4net;

namespace PCS.Utilities.Web
{
    public class Logger
    {
        private const string LOGGER_NAME = "DefaultLogger";
        private static readonly ILog logger;

        static Logger()
        {
            log4net.Config.XmlConfigurator.Configure();
            logger = LogManager.GetLogger(LOGGER_NAME);
        }

        public static bool IsDebugEnabled
        {
            get { return logger.IsDebugEnabled; }
        }
        public static void Debug(object message)
        {
            logger.Debug(message);
        }
        public static void Debug(object message, Exception ex)
        {
            logger.Debug(message, ex);
        }

        public static bool IsInfoEnabled
        {
            get { return logger.IsInfoEnabled; }
        }
        public static void Info(object message)
        {
            logger.Info(message);
        }
        public static void Info(object message, Exception ex)
        {
            logger.Info(message, ex);
        }

        public static bool IsErrorEnabled
        {
            get { return logger.IsErrorEnabled; }
        }
        public static void Error(object message)
        {
            logger.Error(message);
        }
        public static void Error(object message, Exception ex)
        {
            logger.Error(message, ex);
        }

        public static bool IsWarnEnabled
        {
            get { return logger.IsWarnEnabled; }
        }
        public static void Warn(object message)
        {
            logger.Warn(message);
        }
        public static void Warn(object message, Exception ex)
        {
            logger.Warn(message, ex);
        }

        public static bool IsFatalEnabled
        {
            get { return logger.IsFatalEnabled; }
        }
        public static void Fatal(object message)
        {
            logger.Fatal(message);
        }
        public static void Fatal(object message, Exception ex)
        {
            logger.Fatal(message, ex);
        }
    }
}
